package com.website.at.online.action;

import com.opensymphony.xwork2.ActionSupport;
import com.website.at.fw.blogic.IBussiness;
import com.website.at.online.bean.UserLoginOut;
import com.website.at.online.bean.UserLoginIn;

public class UserLoginAction extends ActionSupport {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 5066027984183228635L;
	
	/**
	 * 入力数据
	 */
	private UserLoginIn userLoginIn = null;
	
	/**
	 * 出力数据
	 */
	private UserLoginOut userLoginOut = null;

	/**
	 * 业务处理Bean
	 */
	private IBussiness<UserLoginIn, UserLoginOut> bussiness = null;

	/**
	 * 
	 * @return
	 */
	public String exectue() {
		System.out.println(userLoginIn.getUserName());
		System.out.println(userLoginIn.getPassword());
		userLoginOut = bussiness.execute(userLoginIn);
		System.out.println(userLoginOut.getResult());
		return SUCCESS;
	}

	/**
	 * @param bussiness the bussiness to set
	 */
	public void setBussiness(IBussiness<UserLoginIn, UserLoginOut> bussiness) {
		this.bussiness = bussiness;
	}

	/**
	 * @return the userLoginIn
	 */
	public UserLoginIn getUserLoginIn() {
		return userLoginIn;
	}

	/**
	 * @param userLoginIn the userLoginIn to set
	 */
	public void setUserLoginIn(UserLoginIn userLoginIn) {
		this.userLoginIn = userLoginIn;
	}

	/**
	 * @return the userLoginOut
	 */
	public UserLoginOut getUserLoginOut() {
		return userLoginOut;
	}

	/**
	 * @param userLoginOut the userLoginOut to set
	 */
	public void setUserLoginOut(UserLoginOut userLoginOut) {
		this.userLoginOut = userLoginOut;
	}
}
